package ru.urfc.portal.ui.client.widgets;

import com.extjs.gxt.ui.client.widget.form.TextField;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Widget;

public class InvoiceFilter extends BaseFilter {

	interface Binder extends UiBinder<Widget, InvoiceFilter> {}
	private static Binder binder = GWT.create(Binder.class);

	@UiField DateFilter dateFilter;
	@UiField TextField<String> name;
	@UiField Element placeForSearchButton;

	public InvoiceFilter() {
		initWidget(binder.createAndBindUi(this));
		this.descriptor = dateFilter.descriptor;//TODO  it's temporary hack
		this.itemsController = dateFilter.itemsController;// 
		descriptor.addTextField(FILTER_INVOICE_NAME, name);
	}
	
	@Override
	protected Element getPlaceForSearchButton() {
		return placeForSearchButton;
	}
	
}